<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script>
        window.hdjs = {};
        window.hdjs.base = '/hdjs';
        window.hdjs.uploader = 'php/uploader.php?';
        window.hdjs.filesLists = 'php/filesLists.php?';
    </script>
    <script src="../dist/static/requirejs/require.js"></script>
    <script src="../dist/static/requirejs/config.js"></script>
</head>
<body style="padding: 50px;">
<h1>基本使用</h1>
<script>
    require(['hdjs'], function (hdjs) {
        var modalObj = hdjs.modal({
            title: '友情提示你哟',//标题
            content: '后盾人 人人做后盾',//内容
            footer: '<button type="button" class="btn btn-default confirm" data-dismiss="modal">关闭</button>',//底部
            width: 600,//宽度
            events: {
                confirm: function () {
                    //哪个元素上有.confirm类，被点击就执行这个回调
                    alert('点击了关闭按钮');
                }
            }
        });
    });
</script>

<h1>远程加载</h1>
<script>
    require(['hdjs'], function (hdjs) {
        hdjs.modal({
            content: ['http://localhost'],//加载的远程地址
            title: '添加用户',
            width: 800,
            show: true,//直接显示
        });
    });
</script>

<h1>post</h1>
<script>
    require(['hdjs'], function (hdjs) {
        hdjs.modal({
            //加载的远程地址
            content: ['http://localhost/hdjs/test', {name: '后盾网'}],
            title: '添加站点',
            width: 800
        });
    });
</script>
</body>
</html>